# -*- coding: utf-8 -*-
import os
import maya.cmds as mc
from liberHook.BaseHook import BaseHook
from liberLibs.dccLibs import Maya
reload(Maya)


class Hook(BaseHook):
    def __init__(self, library, directory, ext, start, end):
        BaseHook.__init__(self, library, directory, ext, start, end)

    def execute(self):
        if not os.path.isfile(self.file):
            self.append_error("%s is not an exist file." % self.file)
            return
        Maya.import_xgen_archive(self.file)
